package yunquan.wang.base.locale;

import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;

import yunquan.wang.base.spring.SpringContextHolder;

public class LocaleMessage   {
 
private	static MessageSource messageSource = SpringContextHolder.getBean("messageSource");

	public static String getMessage(String code) {
	
		return messageSource.getMessage(code, null,
				LocaleContextHolder.getLocale());
	}
	
	public  String getMessage(String code ,Object [] args)
	{
		return messageSource.getMessage(code, args,
				LocaleContextHolder.getLocale());
	}
}
